use "Community_survey.dta"

mean ViolCasaInvadPol ViolFoiAgredidoPol ViolFamiAssassiPol ViolAmigoAssassi SoubeAlguemePagouArregoPol
estimates store police  

mean ViolCasaInvadCrim ViolAssalArma ViolFamiAssassiCrim SoubeAlguemePagouSeguranca
estimate store criminals

mean ViolMeioTiroteio ViolArmaApontada ViolViuCorpoAssass
estimate store medio 


	
#delimit;


coefplot ///
(police, label(police) color(blue*1.6%90)) ///
(criminals, label(criminals) color(ebg*0.7)) ///
(medio, label(either) color(midblue*1.2%90)), ///
scheme(s1mono) grid(none) noci ///
format(%9.1f) rescale(100) ///
recast(bar) citop barwidt(0.5) ///
xlabel(#8, labsize(small) noticks) xscale(r(0 30)) ///
xtitle("Percentage", size(medium)) ///
ylabel(, labsize(small) noticks nogrid) ///
xscale(noline) yscale(noline) plotregion(lcolor(white)) ///
legend(pos(6) col(3) size(small) region(lcolor(white))) ///
addplot(scatter @at @b if @plot==1, ms(i) mlabel(@b) mlabpos(3) ///
mlabcolor(black) mlabsize(vsmall) ///
|| scatter @at @b if @plot==2, ms(i) mlabel(@b) mlabpos(3) ///
mlabcolor(black) mlabsize(vsmall) ///
|| scatter @at @b if @plot==3, ms(i) mlabel(@b) mlabpos(3) ///
mlabcolor(black) mlabsize(vsmall)) 
;
#delimit cr


